home *** CD-ROM | disk | FTP | other *** search
/ Shareware Extravaganza 7 / Shareware Extravaganza 8 (Most Significant Bits) (Disc 7).iso / win95b / wb32-96a.zip / WWW95.WI_ < prev    next >
Text File  |  1995-12-06  |  20KB  |  512 lines

  1. ; WWWMENUS.DLL
  2. ; Common menus used by WWW Products
  3.  
  4.     CancelCmd="Exit"
  5.     goto %param1%        ; Go immediately to desired section
  6.                          ; Defined sections are:
  7.                               ZIP
  8.                               UNZIP
  9.                               SYSINFO
  10.                               INIEDIT
  11.                               FONEBOOK
  12.                               DIRSIZE
  13.                               FILEINFO
  14.                               FREESPACE
  15.                               CMDSTACK
  16.                               WALLPAPER
  17. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  18. :WALLPAPER
  19.            a=strcat(CurrentPath(),CurrentFile()) ; Is a BMP file hilited?
  20.            if FileExtension(a)=="BMP" then goto walldoit
  21.            a=FileItemize("*.bmp")                ; No?  Any in Current Directory?
  22.            if a!="" then goto sel
  23.  
  24.            ; Hmmm cannot find any BMP in current dir.  Check INI/Prompt user for info
  25.            WallDir1=inireadpvt("wallpaper","WallPaperDir","ASK","WWW-PROD.INI")
  26.            :REASK
  27.            if WallDir1=="ASK" then WallDir=AskLine("WallPaper","What directory are your *.BMP WallPaper files in?",DirWindows(0))
  28.                               else WallDir=WallDir1
  29.            ErrorMode(@off)
  30.            DirChange(WallDir)
  31.            ErrorMode(@cancel)
  32.            a=FileItemize("*.BMP")
  33.            if a=="" then Message("WallPaper Error","No *.BMP files found in %WallDir%")
  34.                     then goto REASK
  35.            if WallDir!=WallDir1 then iniwritepvt("wallpaper","WallPaperDir",WallDir,"WWW-PROD.INI")
  36.  
  37.            :sel
  38.            a=strcat("-None- ",a)
  39.            a=ItemSelect("Select New Wallpaper",a," ")
  40.            terminate(a=="","Wallpaper","No wallpaper selected")
  41.            if a=="-None-" then Wallpaper("",0)
  42.                           then exit
  43.            a=strcat(DirGet(),a)
  44.            :walldoit
  45.            tile=@FALSE
  46.            if FileSize(a)<40000 then tile=@TRUE
  47.            ;if bmp size less than 40K, assume tile, else center
  48.            Wallpaper(a,tile)
  49.            drop(a,b,tile)
  50.            Exit
  51. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  52. :CMDSTACK
  53.         ; CmdStack uses wierd variable names to reduce the chance that a user
  54.         ; will try to execute a statement using the same names!!
  55.         if !IsDefined(CMDSTK987Cmds) Then CMDSTK987Cmds=""
  56.         if !IsDefined(CMDSTK987Last) Then CMDSTK987Last="1+2+3"
  57.         goto %param2%
  58.  
  59.    :PREVIOUS
  60.         If CMDSTK987Cmds == "" Then Goto NEWCMD
  61.         CMDSTK987Now = TextSelect("Select a command, or OK to enter a new command", CMDSTK987Cmds, @tab)
  62.         If CMDSTK987Now != "" Then Goto CMDDOIT
  63.    :NEWCMD
  64.         CMDSTK987Now = AskLine("WIL Interactive", "Command to execute:", CMDSTK987Last)
  65.         If CMDSTK987Now == "" Then Goto PREVIOUS
  66.    :CMDDOIT
  67.         Execute Message(CMDSTK987Now, %CMDSTK987Now%)
  68.         if ItemLocate(CMDSTK987Now,CMDSTK987Cmds,@tab) then goto PREVIOUS
  69.         a=@tab
  70.         if CMDSTK987Cmds=="" then a=""
  71.         CMDSTK987Cmds = StrCat(CMDSTK987Cmds, a, CMDSTK987Now)
  72.         CMDSTK987Last = CMDSTK987Now
  73.         Goto PREVIOUS
  74.  
  75.    :FLUSH
  76.       If AskYesNo("Flush WIL command stack", "Really?") Then CMDSTK987Cmds = ""
  77.       Exit
  78. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  79. :FREESPACE
  80.         Drives=DiskScan(2)     ; 2 is the code for local hard drives
  81.         Dmax=strlen(Drives)
  82.         DIndex=1
  83.         TotalSize=0
  84.         DriveReport=""
  85.         madmax=0
  86.         :COUNTSPACE
  87.         NextDrive=StrSub(Drives,Dindex,1)
  88.         a=DiskFree(NextDrive)/1024
  89.         TotalSize=a+TotalSize
  90.         DriveReport=strcat(DriveReport,NextDrive," = ",@tab,a,"K","@")
  91.         DIndex=Dindex+3  ;each entry is 3 bytes long
  92.         if DIndex<=Dmax then goto COUNTSPACE
  93.         ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
  94.         Drop(TotalSize,DriveReport,Drives,NextDrive)
  95.         Exit
  96. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  97. :FILEINFO
  98.         CancelCmd="goto cancelfi"
  99.         a=FileItemize("")
  100.         if a=="" then a=FileItemize("*.*")
  101.         tot=FileSize(a)
  102.         c=ItemCount(a," ")
  103.         n=0
  104.         b=""
  105.         :ffloop
  106.         if n==c then goto ffshow
  107.         n=n+1
  108.         a1=StrFix(ItemExtract(n,a," ")," ",14)
  109.         a2=FileSize(a1)
  110.         a3=FileTimeGet(a1)
  111.         a4=FileAttrGet(a1)
  112.         b=strcat(b,a1,@tab,a2,@tab,a3,@tab,a4,"|")
  113.         goto ffloop
  114.         :ffshow
  115.         ItemSelect("Total Size=%tot%",b,"|")
  116.         :cancelfi
  117.         drop(a,tot,c,n,a1,a2,a3,a4,b)
  118.         Exit
  119. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  120. :DIRSIZE
  121.         tot = FileSize(FileItemize(""))
  122.         sub1 = DirItemize("")
  123.         if (tot==0 && sub1=="") then tot=FileSize(FileItemize("*.*"))
  124.                                 then sub1=DirItemize("*.*")
  125.         totdir=0
  126.         level=1
  127.         dir1=DirGet()
  128.         numdir1 = ItemCount(sub1, " ")
  129.         index1 = 0
  130.   
  131.         :dsloop
  132.         If index%level% == numdir%level% Then Goto upalevel
  133.         index%level% = index%level% + 1
  134.         DirChange(StrCat(dir%level%, ItemExtract(index%level%, sub%level%, " ")))
  135.         totdir=totdir+1
  136.         tot = tot + FileSize(FileItemize("*.*"))
  137.         level = level + 1
  138.         dir%level% = DirGet()
  139.         sub%level% = DirItemize("*.*")
  140.         numdir%level% = ItemCount(sub%level%, " ")
  141.         index%level% = 0
  142.         goto dsloop
  143.   
  144.         :upalevel
  145.         drop(dir%level%,sub%level%,index%level%,numdir%level%)
  146.         level=level-1
  147.         if level!=0 then goto dsloop
  148.  
  149.         ; -----------
  150.         ; Termination
  151.         ; -----------
  152.         If StrLen(tot) < 9 Then tot = StrCat(StrFill("", 9 - StrLen(tot)), tot)
  153.         tot = StrCat(StrSub(tot,1,3),",",StrSub(tot,4,3),",",StrSub(tot,7,3))
  154.         tot = StrTrim(tot)
  155.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  156.         tot = StrTrim(tot)
  157.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  158.         tot = StrTrim(tot)
  159.         Message("%totdir% Subdirectories included", "Total size %tot% bytes.")
  160.         drop(tot,level,totdir)
  161.         Exit
  162.  
  163. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  164. :SYSINFO
  165.        wintype="retail"
  166.        if WinMetrics(22) then wintype="debug"
  167.         wcx=WinMetrics(-3)
  168.         math="Math"
  169.         switch wcx
  170.            case 0   ; Win16
  171.                 wc=WinConfig()
  172.                 if !(wc&1) then mode="Real"
  173.                 if wc&16 then mode="Standard"
  174.                 if wc&32 then mode="Enhanced"
  175.                 
  176.                 if wc&64 then cpu=8086
  177.                 if wc&128 then cpu=80186
  178.                 if wc&2 then cpu=286
  179.                 if wc&4 then cpu=386
  180.                 if wc&8 then cpu=486
  181.                 mode = strcat(mode,' ',wintype,' Windows ')
  182.                 if !(wc&1024)  then math="No math"
  183.                 break
  184.           case 1 ; Win32 Intel
  185.                mode="Intel 32-bit %wintype% Windows "
  186.                cpu= ItemExtract(6,WinSysInfo(),@tab)
  187.                break
  188.           case 2 ; Dec Alpha
  189.                mode="DEC Alpha %wintype% Windows NT "
  190.                cpu= ItemExtract(6,WinSysInfo(),@tab)
  191.                break
  192.           case 3 ; MIPS
  193.                mode="MIPS %wintype% Windows NT "
  194.                cpu= ItemExtract(6,WinSysInfo(),@tab)
  195.                break
  196.           case 4 ; PowerPC 
  197.                mode="PowerPC %wintype% Windows NT "
  198.                cpu= ItemExtract(6,WinSysInfo(),@tab)
  199.                break
  200.           case wcx
  201.                cpu= ItemExtract(6,WinSysInfo(),@tab)
  202.                mode="Unknown platform %wintype% Windows  "
  203.         endswitch
  204.  
  205.         Sysinfo=strcat(cpu,' ',mode,WinVersion(1),'.',WinVersion(0),@CRLF)
  206.  
  207.         mouse="No Mouse"
  208.         if WinMetrics(19) then mouse="Mouse"
  209.  
  210.         Sysinfo=strcat(sysinfo,math," co-processor.   ",mouse,' available.',@CRLF)
  211.  
  212.         sysinfo=strcat(sysinfo,WinMetrics(0),'x',WinMetrics(1)," video resolution.  ",WinMetrics(-1),"  colors.",@CRLF)
  213.  
  214.         ErrorMode(@OFF)
  215.         LastError()
  216.         PlayMedia("Status WaveForm Ready")
  217.         ErrorMode(@CANCEL)
  218.         if LastError()!=1193 then sysinfo=strcat(sysinfo,"Windows multimedia extensions present.",@CRLF)
  219.         a=NetInfo(0)
  220.         if a=="MULTINET"
  221.              b=NetInfo(1)
  222.              bug=strcat(b,"network(s) installed"))
  223.              ;Message("Multinet supporting  %count% networks", b)
  224.         else
  225.              ;Message("Installed Network", a)
  226.              bug=strcat(a," network installed")
  227.         endif
  228.         sysinfo=strcat(sysinfo,bug,@crlf)
  229.  
  230.  
  231.         switch wcx
  232.            case 0
  233.                bug=WinResources(0)/1024   ; Compute memory avail
  234.                math=strlen(bug)
  235.                if math>3 then bug=strcat(strsub(bug,1,math-3),',',strsub(bug,math-2,3))
  236.                sysinfo=strcat(sysinfo,@crlf,bug," KB Free Memory",@crlf)
  237.                sysinfo=strcat(sysinfo,WinResources(2),"%% System Resources Free (",WinResources(3),"%% GDI, ",WinResources(4),"%% User)",@crlf)
  238.               break
  239.            case wcx
  240.               bug=WinResources(11)/1024   ; Get Physical memory avail
  241.               sysinfo=strcat(sysinfo,@crlf,bug," KB Physical Memory",@crlf)
  242.               bug=(WinResources(14)/1024)+bug   ; Get Virtual memory + Physical avail
  243.               sysinfo=strcat(sysinfo,bug," KB Total Memory",@crlf)
  244.         end switch
  245.  
  246.  
  247.         sysinfo=strcat(sysinfo,"Console ",DosVersion(1),'.',DosVersion(0),"  using ",environment("COMSPEC"),@CRLF)
  248.         disks=DiskScan(1)
  249.         disks=StrReplace(disks,@tab," ")
  250.         if disks!="" then sysinfo=strcat(sysinfo,"Floppies ",disks,@CRLF)
  251.         disks=DiskScan(2)
  252.         disks=StrReplace(disks,@tab," ")
  253.         if disks!="" then sysinfo=strcat(sysinfo,"Hard Disks ",disks,@CRLF)
  254.         disks=DiskScan(4)
  255.         disks=StrReplace(disks,@tab," ")
  256.         if disks!="" then sysinfo=strcat(sysinfo,"Network Disks ",disks,@CRLF)
  257.         sysinfo=strcat(sysinfo,"Windows Directory ",DirWindows(0),@CRLF)
  258.         sysinfo=strcat(sysinfo,"System  Directory ",DirWindows(1),@CRLF)
  259.         sysinfo=strcat(sysinfo,@CRLF,"WIL Interpreter Ver ",VersionDll())
  260.  
  261.         ver=Version()
  262.         Message("%Param2% %ver% SysInfo",Sysinfo)
  263.         Exit
  264.  
  265. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  266. :ZIP
  267. :UNZIP
  268.     debug(1)
  269.     CancelCommand="goto ZZCANCEL"
  270.     ErrMsg=""
  271.     If !FileExist("wwwdos.bat")   Then ErrMsg="WWWDOS.BAT   not found"
  272.     If !FileExist("wwwdosp.pif")  Then ErrMsg="WWWDOSP.PIF  not found"
  273.     If !FileExist("wwwdosc.pif")  Then ErrMsg="WWWDOSC.PIF  not found"
  274.     If !FileExist("wwwzipls.exe") Then ErrMsg="WWWZIPLS.EXE not found"
  275.     If !FileExist("pkzip.exe")    Then ErrMsg="PKZIP.EXE    not found"
  276.     If !FileExist("pkunzip.exe")  Then ErrMsg="PKUNZIP.EXE  not found"
  277.     If !FileExist("%FCDir789672%browser.exe")  Then ErrMsg="%FCDir789672%BROWSER.EXE  not found"
  278.     If ErrMsg!="" Then Goto ShowError
  279.  
  280.         goto %param1%2     ; must be ZIP or UNZIP
  281.  
  282. :ZIP2
  283.         DaMove=" -a "
  284.         DaDirs=""
  285.         DaWho="*.*"
  286.         DaZip=""
  287.         DaRefresh=0
  288.         DaTitle="Files"
  289.         param3=strlower(param3)
  290.         if param3=="move" then DaMove=" -m "
  291.         goto %param2%         ; Must be CURRENT, DIR, SUBDIR, or HILITED
  292.  
  293. :CURRENT
  294.         DaWho=strcat(CurrentPath(),CurrentFile())
  295.         DaZip=strcat(FileRoot(DaWho),".ZIP")
  296.         goto ZIPDO
  297. :SUBDIR
  298.        DaDirs=" -r -p "
  299.        DaRefresh=1
  300.        DaTitle="Structure"
  301.        goto ZIPDO
  302.  
  303. :HILITED
  304.         b=FileItemize("")
  305.         If b=="" Then ErrMsg="Zip Hilited files?  No files hilited!"
  306.                  Then Goto ShowError
  307.         b=strreplace(b," ",@CRLF)
  308.         fp=FileOpen("FC-TEMP9.XCV","WRITE")
  309.         FileWrite(fp,b)
  310.         FileClose(fp)
  311.         Drop(b)
  312.         DaWho="@FC-TEMP9.XCV"
  313.         goto ZIPDO
  314.  
  315. :DIR
  316.        DaTitle="Directory"
  317.        goto ZIPDO
  318.  
  319. :ZIPDO
  320.         DaZip=AskLine("Zip %DaTitle%","Enter desired ZIP name",DaZip)
  321.         if DaZip=="" then goto zzcancel
  322.         Runwait("wwwdosc.pif","pkzip.exe %DaMove% %DaDirs% %DaZip% %DaWho%")
  323.         if DaWho=="FC-TEMP9.XCV" then FileDelete(DaWho)
  324.         Refresh(DaRefresh)
  325.         Display(3,"Zip %DaTitle%","Complete")
  326.         goto zzcancel
  327.  
  328. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  329. :UNZIP2
  330.  
  331.        ViewFlag=0
  332.        zipsort=param3
  333.        goto %param2%    ; must be ALL, VIEW, or INDIV
  334.  
  335. :ALL
  336.         zipfile=strcat(CurrentPath(),CurrentFile())
  337.         if FileExtension(zipfile)=="ZIP" then goto alldoit
  338.         zipfile=FileItemize("*.zip")
  339.         If zipfile=="" Then ErrMsg="UnZip files?  No zip files found!"
  340.                  Then Goto ShowError
  341.         zipfile=itemselect("Select file to UnZip",zipfile," ")
  342.         if zipfile=="" then goto zzcancel
  343. :alldoit
  344.         if param3==2 then goto allspec
  345.         runwait("wwwdosc.pif","pkunzip.exe -d %zipfile%")
  346.         Refresh(1)
  347.         goto zzcancel
  348.  
  349. :allspec
  350.         RetHome="allspec1"
  351.         goto DoOptions
  352. :allspec1
  353.         if overwarn==0 then overwarn=" -o "
  354.                        else overwarn=""
  355.         RunWait("wwwdosc.pif", "pkunzip.exe -d %overwarn% %zipfile% %targdir% *.*")
  356.         Refresh(1)
  357.         goto zzcancel
  358.  
  359.  
  360.  
  361. :INDIV
  362.        ViewFlag=param3
  363.        if ViewFlag==1 then zipsort=1
  364.                       then overwarn=0
  365.                       then targdir=""
  366.                       then goto VIEW
  367.  
  368.         RetHome="VIEW"
  369.         goto DoOptions
  370.  
  371. :VIEW
  372.         workdir = Environment("TEMP")
  373.         If workdir == "" Then workdir = DirWindows(0)
  374.         If StrSub(workdir, StrLen(workdir), 1) != "\" Then workdir = StrCat(workdir, "\")
  375.         if ViewFlag==0 then targdir=workdir
  376.         zipfile=strcat(CurrentPath(),CurrentFile())
  377.         if FileExtension(zipfile)=="ZIP" then goto viewdoit
  378.         zipfile=FileItemize("*.zip")
  379.         If zipfile=="" Then ErrMsg="UnZip files?  No zip files found!"
  380.                  Then Goto ShowError
  381.         if ViewFlag==0 then TSMsg="Select ZIP file to view"
  382.                        else TSMsg="Select ZIP file to use"
  383.         zipfile=itemselect(TSMsg,zipfile," ")
  384.         if zipfile=="" then goto zzcancel
  385.  
  386. :viewdoit
  387.         ziplist = StrCat(workdir, "wwwunzip.lst")
  388.         If FileExist(ziplist) Then FileDelete(ziplist)
  389.  
  390.         RunWait("wwwzipls.exe","%zipfile% %ziplist% %zipsort%")
  391.         if ViewFlag==0 then TSMsg="Select file to view"
  392.                        else TSMsg="Select file to extract"
  393. :TXSEL
  394.         OldFont=IntControl(28,1,0,0,0)        ; Set fixed pitch font in text box
  395.         member=TextBox(TSMsg,ziplist)
  396.         IntControl(28,OldFont,0,0,0)          ; Restore previous font pitch type
  397.         if member=="" then goto ZZCANCEL
  398.  
  399.         member=strsub(member,46,strlen(member)-45)
  400.         memfile=FileExtension(member)
  401.         if memfile!="" then memfile=strcat(FileRoot(member),".",memfile)
  402.                        else memfile=FileRoot(member)
  403.         
  404.  
  405.         if ViewFlag==0 then goto extract
  406.         if overwarn==0 then goto extract
  407.         If FileExist("%targdir%%memfile%") == @FALSE Then Goto extract
  408.         b= AskYesNo("%member% already exists in %targdir%", "Do you wish to replace it?")
  409.         If b == @NO Then Goto TXSEL
  410.  
  411. :extract
  412.         RunWait("wwwdosc.pif", "pkunzip.exe -o %zipfile% %targdir% %member%")
  413.         If !FileExist("%targdir%%memfile%") Then ErrMsg="Problem extracting %member% from ZIP file"
  414.                                            Then Goto ShowError
  415.  
  416.         if ViewFlag!=0 then TSMsg="Extract Another?"
  417.                        then goto TXSEL
  418.         member = StrUpper(StrCat(targdir, memfile))
  419.         RunZoomWait("%FCDir789672%browser.exe", member)
  420.         FileDelete(member)
  421.         TSMsg="View Another?"
  422.         goto TXSEL
  423.  
  424.  
  425. :SHOWERROR
  426.     Message("Error", ErrMsg)
  427.  
  428. :ZZCANCEL
  429.     if IsDefined(ziplist) then If FileExist(ziplist) Then FileDelete(ziplist)
  430.     Drop(DaMove,DaDirs,DaWho,DaZip,DaRefresh,DaTitle,ViewFlag,zipsort)
  431.     Drop(zipfile,b,RetHome,overwarn,targdir,workdir,ziplist,TSMsg,member)
  432.     Drop(ErrMsg,usecurdir,ThisDir,CheckDir,memfile)
  433.     Drop(ZippyFormat,ZippyCaption,ZippyX,ZippyY,ZippyWidth,ZippyHeight)
  434.     Drop(ZippyNumControls,Zippy01,Zippy02,Zippy03,Zippy04,Zippy05,Zippy06)
  435.     Drop(Zippy07,Zippy08,Zippy09,Zippy10,Zippy11,Zippy12,Zippy13)
  436.     exit
  437. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  438.  
  439. :DOOPTIONS
  440.         zipsort = IniReadPvt("WWWUNZIP", "SortOrder", 1, "www-prod.ini")
  441.         overwarn=IniReadPvt("WWWUNZIP","OverWarn",1,"www-prod.ini")
  442.         whichdir=IniReadPvt("WWWUNZIP","WhichDir",1,"www-prod.ini")
  443.  
  444.         ; Undocumented, new, beta dialog function being used here.  Will
  445.         ; be documented in the 2.0 release.  Good Luck.
  446.  
  447.  
  448.         ZippyFormat=`WWWDLGED,4.0`
  449.  
  450.         ZippyCaption=`Zip Options`
  451.         ZippyX=-1
  452.         ZippyY=-1
  453.         ZippyWidth=217
  454.         ZippyHeight=115
  455.         ZippyNumControls=13
  456.         Zippy01=`6,18,80,DEFAULT,RADIOBUTTON,whichdir,"Use Current Dir ->",1`
  457.         Zippy02=`6,32,80,DEFAULT,RADIOBUTTON,whichdir,"Use Specified Dir ->",2`
  458.         Zippy03=`86,32,124,DEFAULT,EDITBOX,targdir,""`
  459.         Zippy04=`16,64,56,DEFAULT,RADIOBUTTON,zipsort,"by Name",1`
  460.         Zippy05=`16,76,58,DEFAULT,RADIOBUTTON,zipsort,"by Extension",2`
  461.         Zippy06=`16,88,46,DEFAULT,RADIOBUTTON,zipsort,"by Date",3`
  462.         Zippy07=`16,100,46,DEFAULT,RADIOBUTTON,zipsort,"by Size",4`
  463.         Zippy08=`108,58,80,DEFAULT,CHECKBOX,overwarn,"Warn on Overwrite",1`
  464.  
  465.         Zippy09=`120,78,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Ok",1`
  466.         Zippy10=`120,98,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0`
  467.         Zippy11=`6,4,64,DEFAULT,STATICTEXT,NONAME,"Target Directory"`
  468.         Zippy12=`6,52,64,DEFAULT,STATICTEXT,NONAME,"Sort list by:"`
  469.         Zippy13=`88,20,122,DEFAULT,VARYTEXT,ThisDir,""`
  470.  
  471.  
  472. :gettarg
  473.         ; Undocumented, new, beta dialog function being used here.  Will
  474.         ; be documented in the 2.0 release.  Good Luck.
  475.         ThisDir=DirGet()
  476.         targdir = IniReadPvt("WWWUNZIP", "TargetDir", DirGet(), "www-prod.ini")
  477.         Dialog("Zippy")
  478.  
  479.         if whichdir==1 then usecurdir = @YES
  480.                        then targdir=ThisDir
  481.                        else usecurdir = @NO
  482.         targdir = StrUpper(targdir)
  483.         If targdir == "" Then usecurdir = @YES
  484.                          Then targdir = DirGet()
  485.         If StrSub(targdir, StrLen(targdir), 1) != "\" Then targdir = StrCat(targdir, "\")
  486.         If ThisDir==targdir then usecurdir = @YES
  487.                             then goto targok
  488.         DirChange(targdir)
  489.         CheckDir=DirGet()
  490.         DirChange(ThisDir)
  491.         If ThisDir!=CheckDir Then Goto targok
  492.  
  493.         b= AskYesNo("WWWUNZIP", "%targdir% does not exist.  Do you wish to create it?")
  494.         If b == @NO Then Goto gettarg
  495.         DirMake(targdir)
  496.         DirChange(targdir)
  497.         CheckDir=DirGet()
  498.         DirChange(ThisDir)
  499.         If ThisDir!=CheckDir Then Goto targok
  500.         Message("WWWUNZIP","%targdir% could not be created.  Please respecify.")
  501.         goto gettarg
  502.  
  503.         :targok
  504.         If usecurdir == @NO Then IniWritePvt("WWWUNZIP", "TargetDir", targdir, "www-prod.ini")
  505.         IniWritePvt("WWWUNZIP", "SortOrder", zipsort, "www-prod.ini")
  506.         IniWritePvt("WWWUNZIP", "OverWarn", overwarn, "www-prod.ini")
  507.         IniWritePvt("WWWUNZIP", "WhichDir", whichdir, "www-prod.ini")
  508.         goto %RetHome%
  509. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  510. :CANCEL        ; This cancel is shared by ALL the above routines.
  511. %CancelCmd%    ; Execute Cancel Command
  512.